<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
<base th:href="@{/}">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<!--style start-->
<th:block th:include ="commHeaderInclude::commHead"></th:block>
<th:block th:include ="commHeaderInclude::formPageComm"></th:block>
<!--style end-->
<title>选择医保定点机构</title>
</head>

<body class="ht">
<th:block th:include="commHeaderInclude::loading"></th:block>
	<div class="content-wrapper">
		<form class="searchForm" id="searchForm" method="post">
			<div class="card" id="searchModule">
				<div class="card-body">
					<h4 class="card-title">按条件查询医保定点机构</h4>
					<div class="module searchModule" th:object="${vo.dto}">
						<ul class="mb-3">
							<li>
								<label>机构名称</label>
								<input type="text" name="orgNameKeywords" th:value="*{@util.fStr(orgNameKeywords)}" />
							</li>
							<li>
								<label>统一社会信用代码</label>
								<input type="text" name="orgCode" th:value="*{orgCode}" />
							</li>
						</ul>
						<div class="searchBtnContainer ml-4" style="top: 0;">
							<input type="hidden" name="token"  th:value="${session.token}">
							<input class="btn btn-primary" type="submit" id="search" value="查询">
							<input class="btn btn-clear" type="clear" role="ClearButton" value="清空">
						</div>
					</div>
				</div>
			</div>
		</form>

		<form class="listForm" method="post" id="listForm">
			<input type="hidden" name="token"  th:value="${session.token}">
			<div class="card mb-3 border-top-0">
				<div class="card-body listModule" id="listModule">
					<h4 class="card-title">待选择医保定点机构列表</h4>
					<div class="module">
						<div>
							<table cellpadding="0" cellspacing="0" class="hTable">
								<thead>
									<tr>
										<th>序号</th>
										<th>机构名称</th>
										<th>统一社会信用代码</th>
										<th>选择</th>
									</tr>
								</thead>
								<tbody>
									<tr th:each="li,item:${vo.page.list}">
										<td th:text="${item.index+vo.page.startRow}">序号</td>
										<td th:text="${@util.fStr(li.orgName)}">机构名称</td>
										<td th:text="${li.orgCode}">统一社会信用代码</td>
										<td><a class="btn btn-outline-primary btn-sm selectButton" th:data-id="${li.id}">选择</a></td>
									</tr>
								</tbody>
							</table>
							<div class="noneRecord" th:if="${vo.page.total==0}">查无记录！</div>
						</div>
						<th:block th:include="commHeaderInclude::pageInfoComm"></th:block>
					</div>
				</div>
			</div>
		</form>
	</div>
</body>
<script>
var page=new ListPage();
page.init();

$(".selectButton").on("click",function(event){
	var id=event.currentTarget.dataset.id;
	parent.setHospitalById(id);
})
</script>
</html>